<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Add entries to LDAP directory</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.ldap-8859-to-t61.html">« ldap_8859_to_t61</a></li>
      <li style="float: right;"><a href="function.ldap-add.html">ldap_add »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.ldap.html">LDAP 函数</a></li>
    <li>Add entries to LDAP directory</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.ldap-add-ext" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ldap_add_ext</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.3.0, PHP 8)</p><p class="refpurpose"><span class="refname">ldap_add_ext</span> &mdash; <span class="dc-title">Add entries to LDAP directory</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ldap-add-ext-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ldap_add_ext</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="class.ldap-connection.html" class="type LDAP\Connection">LDAP\Connection</a></span> <code class="parameter">$ldap</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$dn</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">array</span> <code class="parameter">$entry</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">array</span><span class="type"></span></span> <code class="parameter">$controls</code><span class="initializer"> = <strong><code>null</code></strong></span></span><br>): <span class="type"><span class="type"><a href="class.ldap-result.html" class="type LDAP\Result">LDAP\Result</a></span>|<span class="type"><span class="type false">false</span></span></span></div>

  <p class="para rdfs-comment">
   Does the same thing as <span class="function"><a href="function.ldap-add.html" class="function">ldap_add()</a></span> but returns
   an <span class="classname"><a href="class.ldap-result.html" class="classname">LDAP\Result</a></span> instance to be parsed with <span class="function"><a href="function.ldap-parse-result.html" class="function">ldap_parse_result()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ldap-add-ext-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
    See <span class="function"><a href="function.ldap-add.html" class="function">ldap_add()</a></span>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ldap-add-ext-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an <span class="classname"><a href="class.ldap-result.html" class="classname">LDAP\Result</a></span> instance, 或者在失败时返回 <strong><code>false</code></strong>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.ldap-add-ext-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.1.0</td>
 <td>
  现在 <code class="parameter">ldap</code> 参数接受 <span class="classname"><a href="class.ldap-connection.html" class="classname">LDAP\Connection</a></span>
  实例，之前接受 <a href="language.types.resource.html" class="link">资源(resource)</a>。
 </td>
</tr>

     <tr>
 <td>8.1.0</td>
 <td>
  Returns an <span class="classname"><a href="class.ldap-result.html" class="classname">LDAP\Result</a></span> instance now;
  previously, a <a href="language.types.resource.html" class="link">资源(resource)</a> was returned.
 </td>
</tr>

     <tr>
<td>8.0.0</td>
<td>
  <code class="parameter">controls</code> is nullable now; previously, it defaulted to <code class="literal">[]</code>.
</td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 notes" id="refsect1-function.ldap-add-ext-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">注意</strong>: <span class="simpara">此函数可安全用于二进制对象。</span></p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ldap-add-ext-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.ldap-add.html" class="function" rel="rdfs-seeAlso">ldap_add()</a> - Add entries to LDAP directory</span></li>
    <li class="member"><span class="function"><a href="function.ldap-parse-result.html" class="function" rel="rdfs-seeAlso">ldap_parse_result()</a> - Extract information from result</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>